import requests

# 请求的url，以小望之家的以id查企业接口为例
url = "https://endpoint.xiaowangtech.com/xw-moonlit/moonlit/enterprise/search-detail?enterpriseId=410417"

# header信息
header = {
    "Access-Token": "6693dfed-bbbf-4163-9e59-e21a19ec7195",
    "Accept": "application/json, text/plain, */*",
}

# 使用requests发送get请求
r = requests.get(url=url, headers=header)

# 以text格式打印出参
print(r.text)

# 以json格式打印出参
print(r.json())